export default {
  name: 'Rights',
  data () {
    return {
      tableData: []
    }
  },
  async created () {
    const {
      data
    } = await this.$get('rights/list')
    data.forEach(item => {
      item.level = item.level === '0' ? '一级' : (item.level === '1' ? '二级' : '三级')
    })
    this.tableData = data
  },
  methods: {
    headClass () { // 表头居中显示
      return 'text-align:center'
    }
  }
}
